package com.jmp.api.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import one.stand.dto.PageResponse2;

import java.util.Date;
import java.util.List;

/**
 * @author cjr
 */
@Data
@Builder
public class PersonalListResponse {
    @ApiModelProperty(value = "列表数据", dataType = "PersonalListResponse.Content")
    private PageResponse2<Content> contentPage;

    @ApiModel("PersonalListResponse.Content")
    @Data
    @Builder
    public static class Content {
        @ApiModelProperty(value = "用户ID")
        private Integer userId;
        @ApiModelProperty("头像")
        private String userImg;
        @ApiModelProperty("名称")
        private String userName;
        @ApiModelProperty("职位")
        private String position;

        @ApiModelProperty(value = "企业ID")
        private Integer companyId;
        @ApiModelProperty(value = "企业名称")
        private String companyName;
        @ApiModelProperty(value = "企业LOGO")
        private String companyLogo;
        @ApiModelProperty(value = "等级")
        private Integer companyLevel;
        @ApiModelProperty(value = "中科公信:1存在")
        private Integer hasZkgx;

        @ApiModelProperty("类型：1直播 2红木圈 3视频")
        private Integer type;
        @ApiModelProperty(hidden = true)
        private Integer itemId;
        @ApiModelProperty("时间戳")
        private Date time;

        @ApiModelProperty(value = "直播数据", dataType = "PersonalListResponse.Live")
        private Live live;
        @ApiModelProperty(value = "红木圈数据", dataType = "PersonalListResponse.Dynamic")
        private Dynamic dynamic;
        @ApiModelProperty(value = "视频数据", dataType = "DynamicResponse.Video")
        private Video video;
    }

    @ApiModel("PersonalListResponse.Live")
    @Data
    @Builder
    public static class Live {
        @ApiModelProperty("直播ID")
        private Integer roomId;
        @ApiModelProperty("直播图片")
        private String photo;
        @ApiModelProperty("标题")
        private String title;
        @ApiModelProperty("状态图片:直播中 预告 回放")
        private String status;
        @ApiModelProperty("点赞人数")
        private Integer doThumbsNum;
    }

    @ApiModel("PersonalListResponse.Dynamic")
    @Data
    @Builder
    public static class Dynamic {
        @ApiModelProperty("是否本人：1本人")
        private Integer userSelfFlag;

        @ApiModelProperty("动态id")
        private Integer dynamicId;
        @ApiModelProperty("类型:1文章 2动态")
        private Integer type;
        @ApiModelProperty("标题")
        private String title;
        @ApiModelProperty("图片")
        private String photos;

        @ApiModelProperty("评论人数")
        private Integer commentNum;
        @ApiModelProperty("点赞人数")
        private Integer doThumbsNum;
        @ApiModelProperty(value = "点赞人头像", dataType = "PersonalListResponse.Thumbs")
        private List<Thumbs> thumbsImgList;
        @ApiModelProperty("是否点赞：0无 1已点赞")
        private Integer thumbsFlag;

        @ApiModelProperty(value = "评论列表", dataType = "PersonalListResponse.Comment")
        private List<Comment> commentList;
    }


    @ApiModel("PersonalListResponse.Thumbs")
    @Data
    @Builder
    public static class Thumbs {
        private String userName;
        private String userImg;
        private String userChatId;
    }

    @ApiModel("DynamicResponse.Comment")
    @Data
    @Builder
    public static class Comment {
        @ApiModelProperty("评论ID")
        private Integer commentId;
        @ApiModelProperty("评论人名")
        private String userName;
        @ApiModelProperty("评论人头像")
        private String userLogo;
        @ApiModelProperty("评论人聊天ID")
        private String userChatId;
        @ApiModelProperty("回复人名(可能为无)")
        private String replyUserName;
        @ApiModelProperty("评论内容")
        private String content;
        @ApiModelProperty("评论时间")
        private Long time;
    }

    @ApiModel("DynamicResponse.Video")
    @Data
    @Builder
    public static class Video {
        @ApiModelProperty("视频ID")
        private Integer roomId;
        @ApiModelProperty("直播名称")
        private String name;
        @ApiModelProperty("封面")
        private String photo;
        @ApiModelProperty("视频地址")
        private String videoUrl;

        @ApiModelProperty("是否已关注用户:0无 1已关注")
        private Integer userCollectFlag;
        @ApiModelProperty("用户当前直播ID")
        private Integer userCurrentRoomId;
        @ApiModelProperty("用户ID")
        private Integer userId;
        @ApiModelProperty("名片ID")
        private Integer cardId;
        @ApiModelProperty("名片头像")
        private String cardImg;
        @ApiModelProperty("名片名称")
        private String cardName;

        @ApiModelProperty("观看数")
        private Long viewNum;
        @ApiModelProperty("点赞数")
        private Integer collectNum;
        @ApiModelProperty("是否已点赞：1已点赞")
        private Integer collectFlag;
        @ApiModelProperty("评论数")
        private Integer commentNum;
    }
}
